//klasa opisujaca wierzcholek
#include "stdafx.h"
#include "Vertex.h"

Vertex::Vertex()
{
	name = "";
	inputSum = 0;
	outputSum = 0;
	nextVertexes = list<Vertex*>();
	routeList = list<std::pair<list<string>,int>>();
	routes = map<string,int>();
	edges=map<string,int>();
	/*inPaths = list<PathFlow*>();*/	
}

void Vertex::setName(string newName)
{
	name = newName;
}
void Vertex::setOutputSum(int newOutputSum)
{
	outputSum = newOutputSum;
}

void Vertex::setInputSum(int newInputSum)
{
	inputSum = newInputSum;
}

int Vertex::getOutputSum()
{
	return outputSum;
}
int Vertex::getInputSum()
{
	return inputSum;
}

string Vertex::getName()
{
	return name;
}

void Vertex::setNextVertexes(list<Vertex*> newNextVertexes)
{
	nextVertexes = newNextVertexes;
}
list<Vertex*> Vertex::getNextVertexes()
{
	return nextVertexes;
}

void Vertex::addNextVertex(Vertex* nextVertex)
{
	nextVertexes.push_back(nextVertex);
}

map<string,int> Vertex::getRoutes()
{
	return routes;
}
void Vertex::setRoutes(map<string,int> newRoutes)
{
	routes = newRoutes;
}

void Vertex::addRoute(string route, int minCapacity)
{
	routes[route]=minCapacity;
}

map<string,int> Vertex::getEdges()
{
	return edges;
}
void Vertex::setEdges(map<string,int> newEdges)
{
	edges = newEdges;
}
void Vertex::addEdge(string vertexName, int capacity)
{
	edges[vertexName]=capacity;
}

void Vertex::addEdge(string vertexName)
{
	edges[vertexName]=0;
}